<?php

use Illuminate\Database\Seeder;

class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //
        $data = [];
        for($i = 0; $i < 1000; $i++)
        {
        	$tmp['name'] = str_random(5);
        	$tmp['password'] = Crypt::encrypt('123');
        	$tmp['email'] = str_random(5).'@163.com';
        	$tmp['pic'] = 'default.jpg';
        	$tmp['remember_token'] = str_random(50);
        	$time = time();
        	$tmp['add_time'] = $time;
        	$tmp['update_time'] = $time;
        	$data[] = $tmp;

        }
        DB::table('users') -> insert($data);
    }
}
